{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 机器学习练习 1 - 线性回归"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 单变量线性回归"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 国际惯例，先导入相应的包，并且重命名\n",
    "import numpy as np\n",
    "import pandas as pd\n",
    "import matplotlib.pyplot as plt      "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>population</th>\n",
       "      <th>profit</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>6.1101</td>\n",
       "      <td>17.5920</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>5.5277</td>\n",
       "      <td>9.1302</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>8.5186</td>\n",
       "      <td>13.6620</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>7.0032</td>\n",
       "      <td>11.8540</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>5.8598</td>\n",
       "      <td>6.8233</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   population   profit\n",
       "0      6.1101  17.5920\n",
       "1      5.5277   9.1302\n",
       "2      8.5186  13.6620\n",
       "3      7.0032  11.8540\n",
       "4      5.8598   6.8233"
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data = pd.read_csv('ex1/ex1data1.txt', names=['population', 'profit'])  # 加载数据\n",
    "data.head()    # 看下data长什么样子"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>population</th>\n",
       "      <th>profit</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>count</th>\n",
       "      <td>97.000000</td>\n",
       "      <td>97.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>mean</th>\n",
       "      <td>8.159800</td>\n",
       "      <td>5.839135</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>std</th>\n",
       "      <td>3.869884</td>\n",
       "      <td>5.510262</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>min</th>\n",
       "      <td>5.026900</td>\n",
       "      <td>-2.680700</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25%</th>\n",
       "      <td>5.707700</td>\n",
       "      <td>1.986900</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>50%</th>\n",
       "      <td>6.589400</td>\n",
       "      <td>4.562300</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>75%</th>\n",
       "      <td>8.578100</td>\n",
       "      <td>7.046700</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>max</th>\n",
       "      <td>22.203000</td>\n",
       "      <td>24.147000</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "       population     profit\n",
       "count   97.000000  97.000000\n",
       "mean     8.159800   5.839135\n",
       "std      3.869884   5.510262\n",
       "min      5.026900  -2.680700\n",
       "25%      5.707700   1.986900\n",
       "50%      6.589400   4.562300\n",
       "75%      8.578100   7.046700\n",
       "max     22.203000  24.147000"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data.describe()    # 看下数据的整体情况"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAtEAAAHjCAYAAADlk0M8AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvOIA7rQAAIABJREFUeJzt3X2UnNldH/jvLamn1bgHu92yvUYaM4AIYFhZEB0bIsgasyGOjyPDKgSMIc5C1mE3zkJejsTCYTHh5BxGiWGXjUNijIPZ9ZIADWhwzAavxwmxiR1ko2m/Eg/smGl5jj1uNPa0kXpaqrt/dPVMS9Mv9ai7+qmq/nzO6dPVTz3VdXWrVP2tW797b6m1BgAA6F+n7QYAAMCoEaIBAKAhIRoAABoSogEAoCEhGgAAGhKiAQCgISEaAAAaEqIBAKAhIRoAABo62HYD+nH48OF69913t90MAADG3Pvf//7P1Fqftd15IxGi77777ly8eLHtZgAAMOZKKZ/o5zzlHAAA0JAQDQAADQ0sRJdS7iqlvKuU8tFSyodLKT/YO/66UsrlUsql3tfLBtUGAAAYhEHWRF9P8g9qr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O3Yj/o4A+5SRaIB2PK+Usjai/Mok/2+Su9fqnZN8b5L/sO7871z3/T/1Lj+Y5M/3Lr8iq6POt3p6kodrrd3e7zzQO/5Ykjs3advvJnlVkpRSXpzkM7XWz/X1rwLYJ4wgALTjo0leXUr5l0k+nuQHk7w3ya+WUg4m+f0k/2Ld+ZOllPdldfDjlb1jP5/kQinlPyd5Z5LPb3A//zzJXCnlO5K8a90580mul1Luz2ot9h+su83rkvyrUsp8kj9L8uqd/VMBxk+pteknigDsRCnl7iRvq7V+TZ/nP5jkZK8OGYAhoJwDAAAaMhINAAANGYkGAICGhGgAAGhIiAYAgIaEaAAAaEiIBgCAhv5/KA8Fn62E+iQAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 864x576 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "data.plot(kind='scatter', x='population', y='profit', figsize=(12,8))  # 绘制数据并指定x轴和y轴，figsize指定图像尺寸（单位为英寸）\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "现在让我们使用梯度下降来实现线性回归，以最小化成本函数。 以下代码示例中实现的方程在“练习”文件夹中的“ex1.pdf”中有详细说明。"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "首先，我们将创建一个以参数θ为特征函数的代价函数\n",
    "$$J\\left( \\theta  \\right)=\\frac{1}{2m}\\sum\\limits_{i=1}^{m}{{{\\left( {{h}_{\\theta }}\\left( {{x}^{(i)}} \\right)-{{y}^{(i)}} \\right)}^{2}}}$$\n",
    "其中：\\\\[{{h}_{\\theta }}\\left( x \\right)={{\\theta }^{T}}X={{\\theta }_{0}}{{x}_{0}}+{{\\theta }_{1}}{{x}_{1}}+{{\\theta }_{2}}{{x}_{2}}+...+{{\\theta }_{n}}{{x}_{n}}\\\\] "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [],
   "source": [
    "def computeCost(X, y, theta):\n",
    "    # 在上面的h(x)函数中是 theta.T*X ,但是在此处却变成了 X*theta.T\n",
    "    # 因为X是 n*1 纬的向量，在上述公式中的theta是 n*1 纬的向量（参见视频4-1 8分2秒处），视频中要得到一个 1*1 的向量，所以是theta.T*X\n",
    "    # 而此处我们要得到 n*1 的向量和y做运算， 所以theta是 1*n 的向量（可以参见后面的代码） \n",
    "    inner = np.power(((X * theta.T) - y), 2)    \n",
    "    return np.sum(inner) / (2 * len(X))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "考虑到截距项θ0，所以我们需要在数据上额外增加一列1："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>ones</th>\n",
       "      <th>population</th>\n",
       "      <th>profit</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>1</td>\n",
       "      <td>6.1101</td>\n",
       "      <td>17.5920</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>1</td>\n",
       "      <td>5.5277</td>\n",
       "      <td>9.1302</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>1</td>\n",
       "      <td>8.5186</td>\n",
       "      <td>13.6620</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>1</td>\n",
       "      <td>7.0032</td>\n",
       "      <td>11.8540</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>1</td>\n",
       "      <td>5.8598</td>\n",
       "      <td>6.8233</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   ones  population   profit\n",
       "0     1      6.1101  17.5920\n",
       "1     1      5.5277   9.1302\n",
       "2     1      8.5186  13.6620\n",
       "3     1      7.0032  11.8540\n",
       "4     1      5.8598   6.8233"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data.insert(0, 'ones', 1)    # 在data中增加一列，其中0为列的索引，one为列名，1为值\n",
    "data.head()    # 看下现在的data"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "现在我们来做一些变量初始化。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 设置训练集\n",
    "X = data.loc[:, ['ones', 'population']]  # X表示输入变量\n",
    "y = data.loc[:, ['profit']]  # 表示目标变量"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {
    "scrolled": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>ones</th>\n",
       "      <th>population</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>1</td>\n",
       "      <td>6.1101</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>1</td>\n",
       "      <td>5.5277</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>1</td>\n",
       "      <td>8.5186</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>1</td>\n",
       "      <td>7.0032</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>1</td>\n",
       "      <td>5.8598</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   ones  population\n",
       "0     1      6.1101\n",
       "1     1      5.5277\n",
       "2     1      8.5186\n",
       "3     1      7.0032\n",
       "4     1      5.8598"
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "X.head()  # 看下X的样子"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>profit</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>17.5920</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>9.1302</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>13.6620</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>11.8540</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>6.8233</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "    profit\n",
       "0  17.5920\n",
       "1   9.1302\n",
       "2  13.6620\n",
       "3  11.8540\n",
       "4   6.8233"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "y.head()  # 看下y的样子"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "代价函数是应该是numpy矩阵，所以我们需要转换X和Y，然后才能使用它们。 我们还需要初始化theta。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [],
   "source": [
    "X = np.matrix(X.values)\n",
    "y = np.matrix(y.values)\n",
    "# theta = np.matrix(np.array([0,0]))\n",
    "theta = np.matrix(np.array([0, 0]))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "theta 是一个 1*2 矩阵"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "matrix([[0, 0]])"
      ]
     },
     "execution_count": 11,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "theta"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "看下维度"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "((97, 2), (1, 2), (97, 1))"
      ]
     },
     "execution_count": 12,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "X.shape, theta.shape, y.shape"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "计算代价函数 (theta初始值为0)."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "32.072733877455676"
      ]
     },
     "execution_count": 13,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "computeCost(X, y, theta)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# batch gradient decent（批量梯度下降）\n",
    "$${{\\theta }_{j}}:={{\\theta }_{j}}-\\alpha \\frac{\\partial }{\\partial {{\\theta }_{j}}}J\\left( \\theta  \\right)$$\n",
    "\n",
    "求导后得：\n",
    "\n",
    "$${{\\theta }_{j}}:={{\\theta }_{j}}-\\alpha\\frac{1}{m}\\sum\\limits_{i=1}^{m}{{{\\left(\\left( {{h}_{\\theta }}\\left( {{x}^{(i)}} \\right)-{{y}^{(i)}} \\right)x_j^{(i)}\\right)}}}$$"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [],
   "source": [
    "def gradientDescent(X, y, theta, alpha, iters):\n",
    "    temp = np.matrix(np.zeros(theta.shape))\n",
    "    parameters = int(theta.ravel().shape[1])    # 获得参数theta的总个数，ravel()为扁平化函数\n",
    "    history_cost = np.zeros(iters)    # 记录每一次迭代产生的代价值\n",
    "    \n",
    "    # iters表示迭代次数\n",
    "    for i in range(iters):\n",
    "        error = (X * theta.T) - y    # 表示预测值与实际值之间的误差，对应上式中的 h(x) - y\n",
    "        \n",
    "        # 遍历每个θ\n",
    "        for j in range(parameters):\n",
    "            term = np.multiply(error, X[:,j])\n",
    "            temp[0,j] = theta[0,j] - ((alpha / len(X)) * np.sum(term))\n",
    "        theta = temp\n",
    "        history_cost[i] = computeCost(X, y, theta)\n",
    "\n",
    "    return theta, history_cost"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "初始化一些附加变量 - 学习速率α和要执行的迭代次数。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {},
   "outputs": [],
   "source": [
    "alpha = 0.01\n",
    "iters = 1000"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "现在让我们运行梯度下降算法来将我们的参数θ适合于训练集。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "matrix([[-3.24140214,  1.1272942 ]])"
      ]
     },
     "execution_count": 16,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "g, history_cost = gradientDescent(X, y, theta, alpha, iters)\n",
    "g"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "最后，我们可以使用我们拟合的参数计算训练模型的代价函数（误差）。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "4.515955503078912"
      ]
     },
     "execution_count": 17,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "computeCost(X, y, g)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "现在我们来绘制线性模型以及数据，直观地看出它的拟合。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAtEAAAHwCAYAAABg0TMJAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvOIA7rQAAIABJREFUeJzs3Xd4lFX6//H3IUYIRSKIaEJHDCAoJSiIvWwsK0ZUXFRsKHZFJZQtP8u6KxikSBNQaSJfFDGrK4oIqGAHg0aBAEqRBGkSAQkSkvP740wwsOlk5pnyeV2Xl8mTZ2bumaB85sz93MdYaxERERERkfKr5nUBIiIiIiKhRiFaRERERKSCFKJFRERERCpIIVpEREREpIIUokVEREREKkghWkRERESkghSiRSQoGWOaGWOsMeYY3/fvGmNuDcDjPmGMecXfj+N7rARjTLoxZo8x5iFjzAvGmH8E4rGDjTFmgzHmkkre9lxjTGZV11SOx43Y35eIKES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JJ5+wbt06APbt28eaNWto3bo169ev54cffgD4n5Bd6OKLL2bChAkA5Ofns3v3burUqcOePXuKPf+8885j5syZAKxZs4ZNmzaRkJBQ1U9LREREJKIpRPtZgwYNmDp1Kr179+b000+na9eurF69mho1ajBp0iSuvPJKzjnnHJo2bVrs7UePHs3ixYtp3749nTt35vvvv6d+/fp0796ddu3akZKSctj59913H/n5+bRv354bbriBqVOnHrYCLSIiIiJHz5T28X+wSExMtMuWLTvs2KpVq2jTpo1HFUlx9DsRERGRUGeMWW6tTSzrPK1Ei4iIiIhUkD+nc4iIiIiIlCotPYvU+Zlk5+QSFxtDSlICyR3jvS6rTArRIiIiIuKJtPQshszNIDcvH4CsnFyGzM0ACPogrXYOEREREfFE6vzMQwG6UG5ePqnzMz2qqPwUokVERETEE9k5uRU6HkwUokVERETEE3GxMRU6HkwUoitp586ddOjQgQ4dOnDSSScRHx9/6PsDBw4c1X2/+eabpKamVkmdN998M82bN+eMM87g1FNP5dZbbyU7O7vM240YMYL9+/dXSQ0iIiIixUlJSiAmOuqwYzHRUaQkBf9GcbqwsJLq169/aMvvJ554gtq1azNgwIDDzrHWYq2lWrWKvVe55pprqqxOgJEjR5KcnExBQQEjRozgoosuIiMjg+jo6BJvM2LECO644w5q1KhRpbWIiIiIFCq8eDAUp3NEzEp0WnoW3Ycuovngd+g+dBFp6Vl+eZx169bRrl077rnnHjp16sSWLVvo168fiYmJnHbaaTz11FOHzm3UqBFPPPEEHTt25PTTT2fNmjUAvPjii/Tv3x9wK8kPP/wwZ599Ni1atODNN98E3Bbg99xzD6eddhpXXXUVl112GWlpaaXWVq1aNQYMGEC9evV4//33AYqtbeTIkWzbto1zzz2XSy65pMTzRERERI5Wcsd4Phl8EeuHXskngy8KiQANERKiC8enZOXkYvljfIq/gvTKlSvp27cv6enpxMfHM3ToUJYtW8Y333zDggULWLly5aFzGzZsSHp6OnfeeScjRowo9v62bdvGJ598QlpaGkOGDAHg9ddfJysri4yMDCZOnMhnn31W7vo6derE6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gpv89vCrb/EHjn+IWFkx6zEFiSf71jgcvq+bNJUi+KlCb/llCS1CnynTR+lG+HJ0nqEM5ES5IkSRk5Ey1JkiRl5Ey0JEmSlJEhWpIkScrIEC1JkiRlZIiWJEmSMjJES5IkSRkZoiVJkqSM/j98XLN6BeddlgAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 864x576 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "x = np.linspace(data.population.min(), data.population.max(), 100)  # 准备绘制直线的x轴数据\n",
    "f = g[0, 0] + (g[0, 1] * x)  # 通过假设函数h(x)，输入x计算直线y轴的值\n",
    "\n",
    "fig, ax = plt.subplots(figsize=(12,8))\n",
    "ax.plot(x, f, 'r', label='Prediction')  # 绘制直线\n",
    "ax.scatter(data.population, data.profit, label='Traning Data')  # 绘制散点图\n",
    "ax.legend(loc=2)\n",
    "ax.set_xlabel('Population')\n",
    "ax.set_ylabel('Profit')\n",
    "ax.set_title('Predicted Profit vs. Population Size')\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "由于梯度方程式函数也在每个训练迭代中输出一个代价的向量，所以我们也可以绘制。 请注意，代价总是降低 - 这是凸优化问题的一个例子。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAtQAAAHwCAYAAACG+PhNAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvOIA7rQAAIABJREFUeJzt3XeYXVW9//H3dxISSAKEQAICgVBCryEgvQWpAcRCF6WKXa7lCnqxcBV/F66AcAURRJFOaNKRXkQghaIEpEOoISCEQELK+v2xzpjJ5EyyJ2fO7D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VKaUfRMTXU0qbVPmszwCbABuTZyt7JCLurezbFFgfeA14ANgmIp4E9gPWSSmliBjY4VcvSV2MLdSS1Ph2BQ6LiEeBh4BlgeGVfQ+3CNMA34yIx4C/AUNbHNeWbYFLU0qzU0pvAvcAm7c496SU0hzgUXJXlPeB6cB5EfEZ8hTAktSjGaglqfEF8I2U0iaVZbWUUnML9bR/HxSxI7ALsFVKaWNgArB4gXO3ZUaL97OB3imlWeRW8auATwO3tOtKJKkbMlBLUuOZCizZYv1W4CsRsRhARKwVEf2r/NzSwLsppQ8jYh1gyxb7Zjb/fCv3AgdU+mkPBrYHHm6rsIgYACydUroJ+Da5u4gk9Wj2oZakxvM4MKvSdeMPwBnk7hbjKw8GTia3Drd2C3BsRDwOPE3u9tHsXODxiBifUjqkxfZrgK2Ax4AEfD+l9EYlkFezJHBdRCxObt0+btEuUZK6j0gplV2DJEmS1GXZ5UOSJEmqgYFakiRJqoGBWpIkSaqBgVqSJEmqgYFakiRJqoGBWpIkSaqBgVqSJEmqgYFakiRJqsH/BzMppY6+R3ZYAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 864x576 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "fig, ax = plt.subplots(figsize=(12,8))\n",
    "ax.plot(np.arange(iters), history_cost, 'r')\n",
    "ax.set_xlabel('Iterations')\n",
    "ax.set_ylabel('Cost')\n",
    "ax.set_title('Error vs. Training Epoch')\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 多变量线性回归"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "练习1还包括一个房屋价格数据集，其中有2个变量（房子的大小，卧室的数量）和目标（房子的价格）。 我们使用我们已经应用的技术来分析数据集。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Size</th>\n",
       "      <th>Bedrooms</th>\n",
       "      <th>Price</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>2104</td>\n",
       "      <td>3</td>\n",
       "      <td>399900</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>1600</td>\n",
       "      <td>3</td>\n",
       "      <td>329900</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>2400</td>\n",
       "      <td>3</td>\n",
       "      <td>369000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>1416</td>\n",
       "      <td>2</td>\n",
       "      <td>232000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>3000</td>\n",
       "      <td>4</td>\n",
       "      <td>539900</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   Size  Bedrooms   Price\n",
       "0  2104         3  399900\n",
       "1  1600         3  329900\n",
       "2  2400         3  369000\n",
       "3  1416         2  232000\n",
       "4  3000         4  539900"
      ]
     },
     "execution_count": 20,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "path = 'ex1/ex1data2.txt'\n",
    "data2 = pd.read_csv(path, header=None, names=['Size', 'Bedrooms', 'Price'])\n",
    "data2.head()    "
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "对于此任务，我们添加了另一个预处理步骤 - 特征归一化。 这个对于pandas来说很简单"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Size</th>\n",
       "      <th>Bedrooms</th>\n",
       "      <th>Price</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>0.130010</td>\n",
       "      <td>-0.223675</td>\n",
       "      <td>0.475747</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>-0.504190</td>\n",
       "      <td>-0.223675</td>\n",
       "      <td>-0.084074</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>0.502476</td>\n",
       "      <td>-0.223675</td>\n",
       "      <td>0.228626</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>-0.735723</td>\n",
       "      <td>-1.537767</td>\n",
       "      <td>-0.867025</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>1.257476</td>\n",
       "      <td>1.090417</td>\n",
       "      <td>1.595389</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "       Size  Bedrooms     Price\n",
       "0  0.130010 -0.223675  0.475747\n",
       "1 -0.504190 -0.223675 -0.084074\n",
       "2  0.502476 -0.223675  0.228626\n",
       "3 -0.735723 -1.537767 -0.867025\n",
       "4  1.257476  1.090417  1.595389"
      ]
     },
     "execution_count": 21,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data2 = (data2 - data2.mean()) / data2.std()    # mean()方法计算平均值，std()方法计算标准差\n",
    "data2.head()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "现在我们重复第1部分的预处理步骤，并对新数据集运行线性回归程序。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Ones</th>\n",
       "      <th>Size</th>\n",
       "      <th>Bedrooms</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>1</td>\n",
       "      <td>0.130010</td>\n",
       "      <td>-0.223675</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>1</td>\n",
       "      <td>-0.504190</td>\n",
       "      <td>-0.223675</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>1</td>\n",
       "      <td>0.502476</td>\n",
       "      <td>-0.223675</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>1</td>\n",
       "      <td>-0.735723</td>\n",
       "      <td>-1.537767</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>1</td>\n",
       "      <td>1.257476</td>\n",
       "      <td>1.090417</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   Ones      Size  Bedrooms\n",
       "0     1  0.130010 -0.223675\n",
       "1     1 -0.504190 -0.223675\n",
       "2     1  0.502476 -0.223675\n",
       "3     1 -0.735723 -1.537767\n",
       "4     1  1.257476  1.090417"
      ]
     },
     "execution_count": 22,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# add ones column\n",
    "data2.insert(0, 'Ones', 1)\n",
    "\n",
    "# set X (training data) and y (target variable)\n",
    "X2 = data2.loc[:, ['Ones', 'Size', 'Bedrooms']]\n",
    "y2 = data2.loc[:, ['Price']]\n",
    "\n",
    "X2.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Price</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>0.475747</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>-0.084074</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>0.228626</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>-0.867025</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>1.595389</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "      Price\n",
       "0  0.475747\n",
       "1 -0.084074\n",
       "2  0.228626\n",
       "3 -0.867025\n",
       "4  1.595389"
      ]
     },
     "execution_count": 23,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "y2.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 24,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0.13070336960771892"
      ]
     },
     "execution_count": 24,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# convert to matrices and initialize theta\n",
    "X2 = np.matrix(X2.values)\n",
    "y2 = np.matrix(y2.values)\n",
    "theta2 = np.matrix(np.array([0,0,0]))\n",
    "\n",
    "# perform linear regression on the data set\n",
    "g2, history_cost2 = gradientDescent(X2, y2, theta2, alpha, iters)\n",
    "\n",
    "# get the cost (error) of the model\n",
    "computeCost(X2, y2, g2)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "我们也可以快速查看这一个的训练进程。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 25,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAtoAAAHwCAYAAACYMcj+AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvOIA7rQAAIABJREFUeJzt3Xu4HWV99//3NydOCSQhm0RCQgJEIQLlEAFRECsoVgT0wQpKoZVKqVIU/VWxnp7SR8VDUX9KtT6K1qpQRLHRIgcRwROQIMgZDZFDCJAACQECIYfv88fMJoudnWQne82edXi/rmuutWbmnrW+aw9r88m977knMhNJkiRJzTWs7gIkSZKkTmTQliRJkipg0JYkSZIqYNCWJEmSKmDQliRJkipg0JYkSZIqYNCWJAEQEYdFxO3NbtsOImJBRBxWdx2SOotBW1LHi4h7I+KZiHiqYf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0UN+OJiKsj4nsUN2EiIn4UETdGxO0RcWq57Rxgq/L1vltu6+09j/K1b4uIWyPirQ2v/YuIuDgi7oqI75Y3jCAizomIO8paPjfkPx1JajEj6i5AkjRgZ1HezRKgDMxPZObLImIL4NcRcUXZ9gBgz8z8U7n+jvIualsBcyLiB5l5VkScnpn79PNebwb2Af6M4u5scyLi2nLfvsBLgYXAr4FXRMQdwJuA3TMzI2Js0z+9JLUZe7QlqX29FjgpIm4Grge2B2aU+25oCNkAZ0TE74HrgCkN7dbnlcAFmbk6Mx8BrgFe1vDaCzJzDXAzxZCWZcCzwNcj4s0Ut0KWpK5m0Jak9hXAP2TmPuUyPTN7e7Sffr5RxGHA4cDLM/PPgJuALQfw2uuzouH5amBEZq6i6EX/AXAscNkmfRJJ6kAGbUlqH08CYxrWLwf+PiJGAkTEiyNim36O2w5YkpnLI2J34KCGfSt7j+/jWuCt5TjwHuBQ4Ib1FRYRo4HtMvNS4L0Uw04kqas5RluS2sctwKpyCMi3gC9SDNv4XXlB4mKK3uS+LgNOi4hbgLspho/0+hpwS0T8LjPf3rD9EuDlwO+BBD6QmQ+XQb0/Y4D/jogtKXrDz9y8jyhJnSMys+4aJEmSpI7j0BFJkiSpAgZtSZIkqQIGbUmSJKkCBm1JkiSpAgZtSZIkqQIGbUmSJKkCBm1JkiSpAgZtSZIkqQL/DyaqrHSHkGdkAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 864x576 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "fig, ax = plt.subplots(figsize=(12,8))\n",
    "ax.plot(np.arange(iters), history_cost2, 'r')\n",
    "ax.set_xlabel('Iterations')\n",
    "ax.set_ylabel('Cost')\n",
    "ax.set_title('Error vs. Training Epoch')\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "我们也可以使用scikit-learn的线性回归函数，而不是从头开始实现这些算法。 我们将scikit-learn的线性回归算法应用于第1部分的数据，并看看它的表现。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 26,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "LinearRegression(copy_X=True, fit_intercept=True, n_jobs=None,\n",
       "         normalize=False)"
      ]
     },
     "execution_count": 26,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "from sklearn import linear_model\n",
    "model = linear_model.LinearRegression()\n",
    "model.fit(X, y)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "scikit-learn model的预测表现"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 27,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAtEAAAHwCAYAAABg0TMJAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvOIA7rQAAIABJREFUeJzs3Xt8nGWd///3pyHQkZaGQzkkBVoFwqGFpkQoFkFBCMgpVBBRXHRR1gMguARav7oWl/21bLEsuguKIogCq2CJCLIBKcpBRVNSCIWGgxTopEIphLYw2DS9fn/cM20mmWMy99z3PfN6Ph48SK65Z+Yzd9r0Pdd87usy55wAAAAAFG5M0AUAAAAAUUOIBgAAAIpEiAYAAACKRIgGAAAAikSIBgAAAIpEiAYAAACKRIgGEEpmNtnMnJltk/z+PjM7twzPO8/Mfu738ySfq9HMusxsvZldZGY/MLNvleO5w8bMVprZx0Z43w+bWU+payrgeav25wWAEA1gFJLBJ2FmG8zsNTO7yczG+fFczrkTnXM/LbCmEYWxAh77I2a2Ofl615tZj5l9fhQPeZmk3zvnxjvnvuec+5Jz7t8HPdeq0lReuOSbiP7ka+wzsz+a2RHlriOX5JurfVLfO+cecc41+vRc55nZiuTP+zUzu9fMxiefd8vPC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+frqlTp+rMM8/Uu+++O+LH+v3vf6+TTz5ZknT33XdrwYIFWY/t6+vTddddt+X73t5enXHGGSN+bgAAABTH9xBtZuMk/UrSxc65dZKul/QBSdPlzVR/N8v9zjezTjPrDGubQCwW07Jly/T0009r22231Q9+8IO0251z2rx5c9GPe+qpp2rOnDlZbx8aouvr63XnnXcW/TwAAAAYGV9DtJnVygvQtzrnFkuSc+4159yAc26zpB9JOizTfZ1zNzjnmp1zzRMn5t15MXAf/vCH9cILL2jlypU64IAD9JWvfEUzZszQq6++qvvvv19HHHGEZsyYoTPPPFMbNmyQJP3f//2f9t9/fx155JFavHjxlse6+eabdcEFF0iSXnvtNZ1++uk65JBDdMghh+iPf/yj5syZoxdffFHTp09XW1ubVq5cqalTp0ryesU///nPa9q0aWpqatJDDz205TFnz56tE044Qfvuu68uu+yyMp8hAACAyuHn6hwm6UZJzzrnFg0a3yPZLy1Jp0t6etRPdvHF0rJlo36YNNOnS//1XwUdumnTJt1333064YQTJEk9PT266aabdN111+mNN97QlVdeqd/97nfafvvtddVVV2nRokW67LLL9MUvflFLlizRPvvso7POOivjY1900UU6+uijddddd2lgYEAbNmzQggUL9PTTT2tZ8jWvXLlyy/H/8z//I0nq7u7WihUrdPzxx+u5556TJC1btkxdXV3abrvt1NjYqAsvvFB77rnnSM8QAABA1fJzdY5Zkj4rqdvMUgn3G5LONrPpkpyklZL+xccafJVIJDR9+nRJ3kz0eeedp97eXu29996aOXOmJOnPf/6znnnmGc2aNUuStHHjRh1xxBFasWKFpkyZon333VeSdM455+iGG24Y9hxLlizRLbfcIsnrwZ4wYYLeeuutrDU9+uijuvDCCyVJ+++/v/bee+8tIfrYY4/VhAkTJEkHHnigXn75ZUI0AADACPi5OsejkjIt2VD0mtB5FThjXGqpnuihtt9++y1fO+d03HHH6fbbb087ZtmyZb6saOGcy3rbdtttt+Xrmpoabdq0qeTPDwAAUA3Y9ttnM2fO1GOPPaYXXnhBkvTuu+/queee0/7776+XXnpJL774oiQNC9kpxx57rK6//npJ0sDAgNatW6fx48dr/fr1GY8/6qijdOutt0qSnnvuOb3yyitqbGws9csCAACoaoRon02cOFE333yzzj77bB188MGaOXOmVqxYobFjx+qGG27QSSedpCOPPFJ77713xvtfe+21euihhzRt2jQdeuihWr58uXbeeWfNmjVLU6dOVVtbW9rxX/nKVzQwMKBp06bprLPO0s0335w2Aw0AAIDRs1wf/4dFc3Oz6+zsTBt79tlndcABBwRUETLhZwIAAKLOzJY655rzHcdMNAAAAFAkP1fnAAAAAHJq74prYUePevsSqq+Lqa2lUa1NDUGXlRchGgAAAIFo74pr7uJuJfoHJEnxvoTmLu6WpNAHado5AAAAEIiFHT1bAnRKon9ACzt6AqqocIRoAAAABKK3L1HUeJgQogEAABCI+rpYUeNhQogeobVr12r69OmaPn26dt99dzU0NGz5fuPGjaN67LvuuksLFy4sSZ3nnHOOpkyZokMOOUT77befzj33XPX29ua936JFi/Tee++VpAYAAIBM2loaFautSRuL1daorSX8G8VxYeEI7bzzzlu2/J43b57GjRunSy+9NO0Y55yccxozprj3KqeffnrJ6pSka665Rq2trdq8ebMWLVqkY445Rt3d3aqtrc16n0WLFumf//mfNXbs2JLWAgAAkJK6eDCKq3NUzUx0e1dcsxYs0ZQ592rWgiVq74r78jwvvPCCpk6dqi996UuaMWOGVq9erfPPP1/Nzc066KCD9J3vfGfLsZMmTdK8efPU1NSkgw8+WM8995wk6cc//rEuvvhiSd5M8te+9jV96EMf0vvf/37dddddkrwtwL/0pS/poIMO0imnnKITTjhB7e3tOWsbM2aMLr30Uu200066//77JSljbddcc41ef/11ffjDH9bHPvaxrMcBAACMVmtTgx6bc4xeWnCSHptzTCQCtFQlITq1fEq8LyGnrcun+BWkn3nmGZ133nnq6upSQ0ODFixYoM7OTj355JN64IEH9Mwzz2w5drfddlNXV5e+8IUvaNGiRRkf7/XXX9djjz2m9vZ2zZ07V5J0xx13KB6Pq7u7Wz/84Q/1pz/9qeD6ZsyYoRUrVkhSxtouueQS7brrrnrkkUf0u9/9Lut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MzMKnISbWbWYJIOSForaaOkBZIGd/Pz3yTpyU7qTJR0Xm57hqSp3dkOM7P+zEm0mVnj7Y2I0RFxJrCP7PfSG20i8E8SHRFzI2JeL7TDzKxPchJtZta7VgCnAUi6M81Ob5Q0M5WNlLRZUpuk9ZJe75i5lrRV0rC0fo6kj4pPLukKSaskfSHpA0nHShpJlrjfkWbEJ0iaLemudMxoSSvT6y1K/6yGpI8kPSxptaSvJE3o+e4xM2tOTqLNzHqJpBbgUmCDpLOBacC5wDjgFkljUtXTgWci4ixgN3BbhZf5GBgXEWOAV4F7ImIrMBd4LM2IrygcMw+4N73eBuD+3L6WiBgLzCyUm5kNKE6izcwa7zBJa4HPgO+A58n+7nZRRPwWEXuAhUDHTO+2iPgkrb+c6tZrBPC+pA3A3cAZB6ssaShwZEQsS0VtwIW5KgvT4+fAyArtMDPrV1p6uwFmZgPQ3ogYnS+QpIPUj5Lt/fw7GXJoybFPAHMiYrGkicDsak39nz/S4wH8GWJmA5hnos3MmsNy4GpJgyUNASaTXS8NcLKk8Wl9CtklGgBbgbPT+rUlzzsU+D6tt+bKfwWOKFaOiF+An3PXO98ILCvWMzMb6JxEm5k1gYhYA7wIrAZWAc9FxBdp9yagVdJ64Gjg6VT+APC4pBVkM8O1zAYWpDo/5MrfBiZ33FhYOKYVeCS93mjgwa68NzOz/kgRxbOEZmbWLNIvabyTfg7PzMyahGeizczMzMwq8ky0mZmZmVlFnok2MzMzM6vISbSZmZmZWUVOos3MzMzMKnISbWZmZmZWkZNoMzMzM7OKnESbmZmZmVX0N0t5r9/yes+QAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 864x576 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "x = np.array(X[:, 1].A1)\n",
    "f = model.predict(X).flatten()\n",
    "\n",
    "fig, ax = plt.subplots(figsize=(12,8))\n",
    "ax.plot(x, f, 'r', label='Prediction')\n",
    "ax.scatter(data.population, data.profit, label='Traning Data')\n",
    "ax.legend(loc=2)\n",
    "ax.set_xlabel('Population')\n",
    "ax.set_ylabel('Profit')\n",
    "ax.set_title('Predicted Profit vs. Population Size')\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 4. normal equation（正规方程）\n",
    "正规方程是通过求解下面的方程来找出使得代价函数最小的参数的：$\\frac{\\partial }{\\partial {{\\theta }_{j}}}J\\left( {{\\theta }_{j}} \\right)=0$ 。\n",
    " 假设我们的训练集特征矩阵为 X（包含了${{x}_{0}}=1$）并且我们的训练集结果为向量 y，则利用正规方程解出向量 $\\theta ={{\\left( {{X}^{T}}X \\right)}^{-1}}{{X}^{T}}y$ 。\n",
    "上标T代表矩阵转置，上标-1 代表矩阵的逆。设矩阵$A={{X}^{T}}X$，则：${{\\left( {{X}^{T}}X \\right)}^{-1}}={{A}^{-1}}$\n",
    "\n",
    "梯度下降与正规方程的比较：\n",
    "\n",
    "梯度下降：需要选择学习率α，需要多次迭代，当特征数量n大时也能较好适用，适用于各种类型的模型\t\n",
    "\n",
    "正规方程：不需要选择学习率α，一次计算得出，需要计算${{\\left( {{X}^{T}}X \\right)}^{-1}}$，如果特征数量n较大则运算代价大，因为矩阵逆的计算时间复杂度为$O(n3)$，通常来说当$n$小于10000 时还是可以接受的，只适用于线性模型，不适合逻辑回归模型等其他模型"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 28,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 正规方程\n",
    "def normalEqn(X, y):\n",
    "    # linalg模块包含线性代数的函数，inv()函数计算逆矩阵\n",
    "    theta = np.linalg.inv(X.T@X)@X.T@y    #X.T@X等价于X.T.dot(X)\n",
    "    return theta"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 29,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "matrix([[-3.89578088],\n",
       "        [ 1.19303364]])"
      ]
     },
     "execution_count": 29,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "final_theta2=normalEqn(X, y)#感觉和批量梯度下降的theta的值有点差距\n",
    "final_theta2"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 30,
   "metadata": {},
   "outputs": [],
   "source": [
    "#梯度下降得到的结果是matrix([[-3.24140214,  1.1272942 ]])"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.1"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
